package com.example.demo1.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2025-01-10
 * Time: 10:48
 */
@RestController
@RequestMapping("/c alc")
public class CalcController {
    @RequestMapping("/sum")
    public String sum (@RequestParam("num1") Integer num1,@RequestParam("num2") Integer num2) {
        Integer sum1 = num1 + num2;
        return "计算机计算结果： " + sum1;
    }
}
